package k8.buffer;

import k8.buffer.var.VARTexCoordsBuffer;
import k8.buffer.vbo.VBOTexCoordsBuffer;

import org.lwjgl.opengl.GLContext;


public abstract class TexCoordsBuffer extends Buffer {
    
    /**
     * Creates an instance of TexCoordsBuffer.
     * 
     * @param initialcapacity
     *          Initial capacity (number of indices)
     */
    public TexCoordsBuffer(int initialcapacity) {
        super(2*initialcapacity);
    }
    
    /**
     * Gets an instance of TexCoordsBuffer.
     * 
     * @param initialcapacity
     *          Initial capacity (number of vertices)
     */
    public static TexCoordsBuffer getInstance(int initialcapacity) {
       return ( GLContext.getCapabilities().GL_ARB_vertex_buffer_object ) ? new VBOTexCoordsBuffer(initialcapacity) : new VARTexCoordsBuffer(initialcapacity);
    }
    
    /** Gets a Slice of this buffer */
    public Slice getSlice() {
    	return getSlice(24);
    }
    
    /** Tells OpenGL this buffer contains the texture coordinates */
    public abstract void glTexCoordPointer();

}
